home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / appkit.683 < prev    next >
Text File  |  1992-02-06  |  2KB  |  46 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f3\fmodern Courier;\f1\fswiss Helvetica;}
  2. \paperw11440
  3. \paperh9000
  4. \margl120
  5. \margr120
  6. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ul0\fs28 printing scaling output\
  7.     \
  8. Q:  I have implemented the 
  9. \f3\fs24 setScalingFactor:
  10. \f0\fs28  method of PrintInfo in order to scale my printed output.  It does not seem to be having any effect -- my printed output is always at 100%.  What could be wrong?\
  11.  
  12. \i     \
  13.  
  14. \i0 A:  If your Window or View subclass has overridden 
  15. \f3\fs24 knowsPagesFirst:last:
  16. \f0\fs28  to return YES and you compute your own page rectangles with 
  17. \f3\fs24 getRect:forPage:
  18. \f0\fs28 , then that View is claiming that it knows how to paginate itself and the 
  19. \f3\fs24 setScalingFactor:
  20. \f0\fs28  method of PrintInfo will have no effect.  \
  21. \
  22. By not automatically scaling the printing, the Appkit allows you to decide how scaling will affect pagination.  Scaling by 50%, for example, should always cause the view to be 50% smaller in both directions, so what was a full-sized page now only takes up a quarter of a page.  However you must decide whether each scaled page continues to be printed on a separate piece of paper or whether you will group four of the scaled pages on each piece of paper.\
  23.  \
  24. In either case, the correct way to get your scaled view to print scaled is to override the View method 
  25. \f3\fs24 addToPageSetup
  26. \f0\fs28  and use the 
  27. \f3\fs24 PSscale()
  28. \f0\fs28  pswrap function to set your scaling factor appropriately:\
  29. \
  30.  
  31. \f3\fs24 -addToPageSetup\
  32. \{\
  33.     [super addToPageSetup];\
  34.     PSscale(width_scale, height_scale);\
  35.     return self;\
  36. \}
  37. \f0\fs28 \
  38. \
  39. \
  40. QA683\
  41. \
  42. Valid for 1.0\
  43. Valid for 2.0            \
  44. \
  45.  
  46.